import Cookies from "js-cookie";
import {ACCESS_TOKEN} from "../store/mutations-type";

const tokenKey = ACCESS_TOKEN;


export function setTokenCookieTime(value, expires) {
    return Cookies.set(tokenKey, value, {expires: expires})
}

export function setTokenCookie(value) {
    return Cookies.set(tokenKey, value);
}

export function getTokenCookie() {
    return Cookies.get(tokenKey)
}

export function removeTokenCookie() {
    return Cookies.remove(tokenKey)
}

export function setCookie(key, value) {
    return Cookies.set(key, value);
}

export function getCookie(key) {
    return Cookies.get(key);
}

export function removeToken(key) {
    return Cookies.remove(key);
}
